package org.fuys.coder.common.holder;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.common.holder
 * @className: UserHolder
 * @author: WangJing
 * @description: 信息持有
 * @date: 2024/6/21 16:57
 * @version: 1.0
 */
public class UserHolder {
    private static final ThreadLocal<Integer> USER_HOLDER = new ThreadLocal<>();

    public static void set(Integer userId) {
        USER_HOLDER.set(userId);
    }

    public static Integer get() {
        return USER_HOLDER.get();
    }

    public static void remove() {
        USER_HOLDER.remove();
    }
}
